Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests #4

Merged
merged 2 commits into from
Feb 9, 2021
Merged

Update tests #4

merged 2 commits into from
Feb 9, 2021

Conversation

johnnypham
Copy link

No description provided.

@@ -242,7 +242,6 @@ public override byte[] EncryptColumnEncryptionKey(string masterKeyPath, string e
{
// Validate the input parameters
ValidateNonEmptyAKVPath(masterKeyPath, isSystemOp: true);
ValidateNotNullOrWhitespace(encryptionAlgorithm, nameof(encryptionAlgorithm));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ValidateEncryptionAlgorithm() already validates if encryptionAlgorithm is null or not equal to "RSA_OAEP".

@@ -214,11 +214,11 @@ internal static string InvalidSignatureTemplate
/// <summary>
/// Looks up a localized string similar to Invalid trusted endpoint specified: &apos;{0}&apos;; a trusted endpoint must have a value..
/// </summary>
internal static string InvalidTrustedEndpointTemplate
internal static string NullOrWhitespaceForEach
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this a more generic validator, same as in the AAP SDK.

@@ -107,7 +107,7 @@ static DataTestUtility()
}

AKVOriginalUrl = c.AzureKeyVaultURL;
if (!string.IsNullOrEmpty(AKVOriginalUrl) && Uri.TryCreate(AKVOriginalUrl, UriKind.Absolute, out Uri AKVBaseUri))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was creating a new local variable and not updating the static field in DataTestUtility. When the static AKVBaseUri was used later to instantiate a KeyClient, it was null.

@@ -117,8 +117,8 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="InvalidTrustedEndpointTemplate" xml:space="preserve">
<value>Invalid trusted endpoint specified: '{0}'; a trusted endpoint must have a value.</value>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A null or empty endpoint couldn't be interpolated.

@cheenamalhotra cheenamalhotra merged commit e54c463 into cheenamalhotra:akv-upgrade Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants